<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.mdkg.net/tags/role" prefix="r"%>

/**
 *活动管理
 */
var activity={
	cookieId:"activity",
	//获取集合地址
	url:$path+"/mc/activityshowList",
	//是否自动加载
	autoload:true,
	//选项卡头信息
	//title:"活动信息",
	//详细信息页面头信息
	infoTitle:"活动管理",
	//是否显示多选
	showchecked:true,
	//功能菜单
	buttons:[
		{name:'添加', bclass:'btnadd',onpress:showInfo,params:{iframe:true}},
		{separator:true},
		{name:'编辑', bclass:'btnedit',onpress:showInfo,params:{check:true,iframe:true}},
		{separator:true},
		{name:'删除', bclass:'btndel',onpress:deleteInfo},
		{separator:true},
		/*{name:'禁用', bclass:'btndel',onpress:deleteInfo, params:{url:'/mc/activitydisableEntity', info: '您确定要禁用选中的活动吗？'}},
		{separator:true},
		{name:'恢复', bclass:'btnCancelDelete',onpress:deleteInfo, params:{url:'/mc/activityableEntity', info: '您确定要恢复选中的活动吗？'}},
		{separator:true} */
	],
	//定义显示列名称
	colModel:[
		{display:'活动标题',name:'title',sortable:true,width:120},
		{display:'封面图片',name:'coverPicIp',sortable:false,width:80},
		{display:'活动图集',name:'picLink',sortable:false,width:80},
		{display:'活动类型',name:'activityType.typeName',sortable:true,width:80},		
		{display:'活动时间',name:'beginTime',sortable:true,width:80},
		{display:'年龄段',name:'ages',sortable:true,width:80},
		{display:'机构名称',name:'organization.name',sortable:true,width:150},
//		{display:'联系地址',name:'contactAddress',sortable:true,width:200},
		{display:'活动地址',name:'activityAddress',sortable:true,width:200},
		{display:'活动地址经度',name:'activityAddressLon',sortable:true,width:80},
		{display:'活动地址纬度',name:'activityAddressLat',sortable:true,width:80},
		{display:'大人价格',name:'adultPrice',sortable:true,width:80},
		{display:'小孩价格',name:'childPrice',sortable:true,width:80},
		{display:'联系人姓名',name:'contactPerson',sortable:true,width:80},
		{display:'联系人号码',name:'contactNum',sortable:true,width:100},
		{display:'已报名人数',name:'joinCount',sortable:true,width:80},
		{display:'限制报名人数',name:'joinLimitCount',sortable:true,width:80},
		{display:'大人是否记数',name:'isAdultRecordDesc',sortable:true,sortName:'isAdultRecord',width:80},
		{display:'活动详情',name:'detailTips',sortable:true,width:80},
		{display:'创建时间',name:'createTime',sortable:true,width:120}

//		{display:'联系位置',name:'contactAddressLocation',sortable:true,width:80},
//		{display:'联系位置经度',name:'contactAddressLon',sortable:true,width:80},
//		{display:'联系位置纬度',name:'contactAddressLat',sortable:true,width:80},
//		{display:'活动地址位置',name:'activityAddressLocation',sortable:true,width:80},
//		{display:'活动地址',name:'activityAddress',sortable:true,width:80},
//		{display:'省id',name:'provinceId',sortable:true,width:80},
//		{display:'城市id',name:'cityId',sortable:true,width:80},
//		{display:'区id',name:'areaId',sortable:true,width:80},
//		{display:'街道id',name:'streetId',sortable:true,width:80},
		
	],
	//是否使用分页
	usepager: true,
	//默认排序属性
	sortname: "createTime",
	//默认排序规则
	sortorder: "desc",
	//每页显示记录数
	//rp: 30,
	//procmsg:'加载中, 请稍等 ...',
	//pagestat: '显示记录从{from}到{to}，总数 {total} 条',
	//是否显示收缩按钮
	showTableToggleBtn: false,
	//删除请求提交地址
	delAction:'/mc/activitydelInfo',
	//自定义查询节点id
	searchDiv:'#activitySearchDiv',
	//显示详细信息页面 action 提交显示地址 modulePath 显示详细信息页面地址
	showAction:'/mc/common/showInfo.jsp?action=/mc/activityshowInfo&modulePath=/mc/activity',
	//列表双击操作 call 回调函数 params 请求附加参数
	onselect:{call:showInfo,params:{iframe:true}}
};


 	/**获取活动图集*/
function openAdPicsTab(activityId) {
	//alert("activityId--------"+activityId); 
	addTab($path + "/mc/activityPicajax?module=activityPic&modulePath=/mc/activity/activityPic&entity.activityId=" + activityId, " 活动图集管理 ", true, true, true);
}

